class Page9 extends BaseScreen {
    public constructor() {
        super();
        this.skinName = "resource/eui_skins/Page9Skin.exml";
    }

	private img_1: eui.Image;
    private img_2: eui.Image;
    private img_3: eui.Image;
    private img_4: eui.Image;
    private img_5: eui.Image;
    private img_6: eui.Image;

    private number_1:NumbersTxtPage;
    private number_2:NumbersTxtPage;
    private number_3:NumbersTxtPage;
    private number_4:NumbersTxtPage;
    private number_5:NumbersTxtPage;
    private mask_3:eui.Rect;

    private img_2_y: number = 0;
    private img_1_y: number = 0;

    protected childrenCreated(): void {
        super.childrenCreated();
        this.init_view();
        this.resetui();
    }

    public resetui(){
        this.img_1.alpha = 0;
        // this.img_3.mask = this.mask_3;
        // this.mask_3.width = 0;
        // this.img_4.alpha = 0;
        this.img_2.x = -640;
        this.img_3.x = -640;
        this.img_4.x = -640;

        // this.number_1.visible = this.number_2.visible = false;
        // this.number_3.visible = this.number_4.visible = false;
        // this.number_5.visible = false;

        // this.number_1.num_txt.textAlign = 'left';
        // this.number_2.num_txt.textAlign = 'left';
        // this.number_3.num_txt.textAlign = 'left';
        // this.number_4.num_txt.textAlign = 'left';
        // this.number_5.num_txt.textAlign = 'left';

        if(this.xx_page){
            this.xx_page.stop();
        }
        
    }

    public init_view() {
        this.img_2_y = this.img_2.y;
        this.img_1_y = this.img_1.y;
        this.showPage();
    }

    public showPage() {
        super.showPage();
        this.resetui();
        

        egret.Tween.get(this.img_1).to({ alpha:1}, 2000);
        egret.Tween.get(this.img_2).wait(200).to({x:0}, 800, egret.Ease.backOut);
        egret.Tween.get(this.img_3).wait(700).to({x:0}, 900, egret.Ease.backOut);
        egret.Tween.get(this.img_4).wait(1200).to({x:0}, 900, egret.Ease.backOut);
        // egret.Tween.get(this.img_2).to({ alpha:1}, 700);

        // this.number_1.startMove(959.92,500,1200,40,'','959.92');

        // egret.Tween.get(this.mask_3).wait(500).to({ width:640}, 1200);
        // egret.Tween.get(this.img_4).wait(500).to({ alpha:1}, 700);

        // this.number_2.startMove(74.73,500,1200,40,'','74.73');
        // this.number_3.startMove(31.4,500,1200,40,'','31.40');
        // this.number_4.startMove(830.51,500,1200,40,'','830.51');
        // this.number_5.startMove(23.28,500,1200,40,'','23.28');

       

        if(this.xx_page){
            this.xx_page.start();
        }
    }

    public resize(): void {
         super.resize();
    }

     protected process(){
        // this.number_1.updateNum();
        // this.number_2.updateNum();
        // this.number_3.updateNum();
        // this.number_4.updateNum();
        // this.number_5.updateNum();
    }
}